/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package util.ejb;

import entities.tools.FilledForm;
import entities.tools.Form;
import entities.tools.Question;
import entities.users.FormSigner;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Marek
 */
@Local
public interface FormFillingBeanInterface {

    FilledForm getFilledForm();
    
    //Ansfers the existing question
    //Todo: toLearn3: Is it possible to easy inject one bean into another bean? Is this aproach having good performance for thy application? Is the server creating new bean instance for every injection, or inject existing one?
    boolean answerQuestion(Question detachedQuestion,String answerValue);

    //Begin the filling of existing form - transaction is created
    boolean beginFillingForm(Form form, FormSigner formSigner);
    boolean beginFillingForm(String linkHash);
    
    //Send filled form - transaction is commited
    boolean sendForm();
    
    public void cancelFormFilling();
}
